/* 图集页面专用样式 */
body {
  font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
  background-color: #f8f9fa;
  color: #333;
  margin: 0;
  padding: 0;
  max-width: 1200px;
  margin: 0 auto;
}

/* 头部样式 */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: #f5f5f5;
  border-bottom: 2px solid #3498db;
  position: sticky;
  top: 0;
  z-index: 100;
  margin-bottom: 30px;
}

h1 {
  color: #2c3e50;
  margin: 0;
  font-size: 2.2em;
}

/* 头部操作按钮区域 */
.header-actions {
  margin-left: auto;
  display: flex;
  gap: 15px;
  align-items: center;
}

/* 操作按钮样式 */
.action-button {
  padding: 12px 25px;
  background-color: #3498db;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-size: 1.1em;
  display: inline-block;
  transition: all 0.3s;
}

.action-button:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

/* 编辑按钮特殊样式 */
.edit-button {
  background-color: #2196F3;
}

.edit-button:hover {
  background-color: #0b7dda;
}

.avatar-wrapper {
    position: relative;
    display: inline-block;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #3498db;
    object-fit: cover;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 50px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    min-width: 120px;
    z-index: 100;
}

.dropdown-menu a {
    display: block;
    padding: 10px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.dropdown-menu a:hover {
    background: #f4f4f4;
}

/* 分类栏 */
.filter-bar {
  margin: 0 20px 25px;
  display: flex;
  gap: 15px;
}

.filter-button {
  padding: 8px 18px;
  border: 1px solid #3498db;
  border-radius: 6px;
  cursor: pointer;
  background: #fff;
  color: #3498db;
  font-size: 1em;
  transition: all 0.3s;
}

.filter-button:hover {
  background: #3498db;
  color: #fff;
}

.filter-button.active {
  background: #3498db;
  color: #fff;
}

/* 图片网格布局 */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  padding: 0 20px;
  margin-bottom: 30px;
}

.thumbnail {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
}

.thumbnail:hover {
  transform: scale(1.02);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 图片预览弹窗 */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  flex-direction: column;
}

#preview {
  max-height: 80vh;
  max-width: 90vw;
  object-fit: contain;
}

/* 导航按钮 */
.nav {
  margin-top: 20px;
  display: flex;
  gap: 20px;
  position: absolute;
  width: 100%;
  justify-content: space-between;
  padding: 0 20px;
  box-sizing: border-box;
}

.nav button {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.5em;
  cursor: pointer;
  transition: all 0.3s;
}

.nav button:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* 关闭按钮 */
#close {
  position: absolute;
  top: 30px;
  right: 30px;
  color: white;
  font-size: 2.5em;
  cursor: pointer;
  transition: all 0.3s;
}

#close:hover {
  color: #e74c3c;
}

/* 响应式调整 */
@media (max-width: 600px) {
  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    padding: 0 10px;
  }
  
  .thumbnail {
    height: 150px;
  }
  
  .nav button {
    width: 40px;
    height: 40px;
  }
  
  #close {
    top: 15px;
    right: 15px;
    font-size: 2em;
  }
  
  h1 {
    font-size: 1.8em;
  }
  
  .action-button {
    padding: 8px 15px;
    font-size: 1em;
  }

  .filter-bar {
    margin: 0 10px 20px;
    gap: 10px;
  }

  .filter-button {
    padding: 6px 12px;
    font-size: 0.9em;
  }
}